package com.cherrish.demo;

import java.lang.reflect.Method;

/**
 * @author cherrish
 * @time 2019-04-08 17:03
 * @name ReflectTest
 * @desc:
 */
public class ReflectTest {
    public static void main(String[] args) {
        Class c = SubReflect.class;
        for(Method m : c.getDeclaredMethods()){
            System.out.println(m.getName());
        }
    }
    public void method1(){
        System.out.println("method1");
    }

    private void method2(){
        System.out.println("method2");
    }
    public String method3(){
        System.out.println("method3");
        return "method3";
    }

}

class SubReflect extends ReflectTest{
    private void mm(){
        System.out.println("mm");
    }
}
